﻿using Shundao.Paged;
using Shundao.Roles;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Shundao.Roless.Dto
{
    public class SearchRolesInput : IPageAndFilteredInput<Roles.Roles>
    {
        public string Name { get; set; }
        public PageRequest Pagination { get; set; }
        public IQueryable<Roles.Roles> Filtered(IQueryable<Roles.Roles> query)
        {
            if (!string.IsNullOrEmpty(Name))
                query = query.Where(s => s.Name.Contains(Name));
            return query;
        }
    }
}
